home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / dalla rivista / amiga.free / sorgenti vari / wolf3dmacsource.sit / Wolf3DMacSource / Intro.c < prev    next >
C/C++ Source or Header  |  1994-09-27  |  1KB  |  49 lines

  1. #include "wolfdef.h"
  2. #include <ctype.h>
  3. #include <stdlib.h>
  4.  
  5. /**********************************
  6.  
  7.     Main game introduction
  8.  
  9. **********************************/
  10.  
  11. void Intro(void)
  12. {
  13.     LongWord *PackPtr;
  14.     LongWord PackLength;
  15.     Byte *ShapePtr;
  16.     
  17.     NewGameWindow(1);    /* Set to 512 mode */
  18.  
  19.     FadeToBlack();        /* Fade out the video */
  20.     PackPtr = LoadAResource(rMacPlayPic);
  21.     PackLength = PackPtr[0];
  22.     ShapePtr = AllocSomeMem(PackLength);
  23.     DLZSS(ShapePtr,(Byte *) &PackPtr[1],PackLength);
  24.     DrawShape(0,0,ShapePtr);
  25.     FreeSomeMem(ShapePtr);
  26.     ReleaseAResource(rMacPlayPic);
  27.     
  28.     BlastScreen();
  29.     StartSong(SongListPtr[0]);    /* Play the song */
  30.     FadeTo(rMacPlayPal);    /* Fade in the picture */
  31.     WaitTicksEvent(240);        /* Wait for event */
  32.     FadeTo(rIdLogoPal);
  33.     if (toupper(WaitTicksEvent(240))=='B') {        /* Wait for event */
  34.         FadeToBlack();
  35.         ClearTheScreen(BLACK);
  36.         BlastScreen();
  37.         PackPtr = LoadAResource(rYummyPic);
  38.         PackLength = PackPtr[0];
  39.         ShapePtr = AllocSomeMem(PackLength);
  40.         DLZSS(ShapePtr,(Byte *) &PackPtr[1],PackLength);
  41.         DrawShape((SCREENWIDTH-320)/2,(SCREENHEIGHT-200)/2,ShapePtr);
  42.         FreeSomeMem(ShapePtr);
  43.         ReleaseAResource(rYummyPic);
  44.         BlastScreen();
  45.         FadeTo(rYummyPal);
  46.         WaitTicksEvent(600);
  47.     }    
  48. }
  49.